<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>for...in遍历对象的属性</title>
</head>

<body>
    <script>
        var books = new Array();
        books[0] = "《JavaScript前端开发案例教程》";
        books[1] = "《Node.js核心基础教程》";
        books[2] = "《HTML5移动Web开发》";
        for (var i in books) {
            document.write(books[i] + '<br/>');
        }
    </script>
</body>

</html>